package com.zhang.boot.core.constants;

public enum ErrorEnum {

    /**
     * 1xxxx 用户错误
     */
    ACCOUNT_ERROR(10001, "用户账号或密码错误"),
    ACCOUNT_LOCK(10002, "用户账号已被锁定"),
    CAPTCHA_INVALID(10003, "验证码已失效"),
    CAPTCHA_EMPTY(10004, "验证码非法"),
    CAPTCHA_ERROR(10004, "验证码错误"),
    /**
     * 请求错误
     */
    ILLEGAL_ACCESS(40001, "访问非法!"),
    /**
     * 参数解密失败
     */
    DECRYPTION_FAILED(40002, "参数解密失败!"),
    /**
     * 配置错误
     */
    PRIVATE_KEY_ERROR(50001, "私钥配置错误");

    private int code;
    private String message;

    ErrorEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
